#ifndef ITEMTREEFORM_H
#define ITEMTREEFORM_H

#include <Campaign.h>
#include <QWidget>
#include <QButtonGroup>


namespace Ui {
    class ItemTreeForm;
}

class ItemTreeForm : public QWidget
{
    Q_OBJECT

public:
    explicit ItemTreeForm(QWidget *parent = 0);
    ~ItemTreeForm();

    void setCampaign(Campaign* c);
    void setCurrent(Item* item);

signals:

    void sigItemSelected(Item* item = 0);


protected slots:

    void onChanged();
    void onTreeButtonClicked(int id);


private:
    Ui::ItemTreeForm *ui;

    QPointer<Campaign> m_campaign;

    QButtonGroup* m_tree_buttons;

private slots:
    void on_itemTreeWidget_itemSelectionChanged();
};

#endif // ITEMTREEFORM_H
